<html>
<body>

<input type="text" id="clock" size="35" />
<script language=javascript>
    var int=self.setInterval("clock()",50)
    function clock()
      {
      var t=new Date()
      document.getElementById("clock").value=t.getSeconds()
      }
    </script>
    </form>
    <button onclick="int=window.clearInterval(int)">
    Stop interval</button>

</body>
</html>